package pack1;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class writefile {

	public static void main(String[] args) throws IOException,InvalidFormatException {
	
	FileInputStream fis= new FileInputStream("d:/book2.xlsx");
Workbook wb = WorkbookFactory.create(fis);
int h=8;
	for(int i=0;i<5;i++)
	{
		 h = wb.getSheet("sheet1").createRow(i).createCell(i).CELL_TYPE_STRING;
	}
	//FileOutputStream fos= new FileOutputStream("d:/book2.xlsx");
	//wb.write(fos);
 System.out.println("hello"+h);
	}
}
